package com.yaodian100.ec.order.entity;

import java.math.BigDecimal;
import java.util.Collection;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import org.apache.commons.lang.StringUtils;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Parameter;

import com.yaodian100.core.common.entity.BaseEntity;

@Entity
@Table(name = "EC_SERVICE_ORDER_MAIN")
public class ServiceOrders extends BaseEntity {
	public enum REASON_TYPE {
		USER_CANCEL("01"), SYSTEM_CANCEL("02"), USER_RETURN_SHIPFARE("03"), CSR_UPDATEORDER("04");
		String value;

		REASON_TYPE(String reason) {
			this.value = reason;
		}

		public String getValue() {
			return value;
		}
	}

	public enum SERVICE_ORDER_BEAN {
		CREATE("EC-ServiceOrderCreateJob"), UPDATE("EC-ServiceOrderUpdateJob");
		String value;

		SERVICE_ORDER_BEAN(String bean) {
			this.value = bean;
		}

		public String getValue() {
			return value;
		}
	}

	public enum SERVICE_TYPE {
		RETURN(1), CHANGE(2), CANCEL(3), SHIP_EXCEPTION(4), RESEND(7), CANCEL_PART(8);
		int value;

		SERVICE_TYPE(int i) {
			this.value = i;
		}

		public int getValue() {
			return value;
		}
	}

	/**
	 *   
	 * 
	 */
	private static final long serialVersionUID = -1201865269797952189L;

	/**
	 * 流水號 s-yyyymmdd00000000
	 */
	@Id
	@GeneratedValue(generator = "seq_ec_service_order")
	@GenericGenerator(name = "seq_ec_service_order", strategy = "com.yaodian100.core.common.dao.hibernate.ServiceOrderIdSeqGenerator", parameters = {
			@Parameter(name = "sequence", value = "seq_ec_service_order"), @Parameter(name = "pattern", value = "000000"),
			@Parameter(name = "date", value = "yyMMdd"), @Parameter(name = "prefix", value = "SR") })
	@Column(name = "service_id", length = 14)
	private String serviceId;

	/**
	 * 退貨申請日期
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "service_dt", nullable = false)
	private Date serviceDt;
	/**
	 * 审核通过或失败日期
	 */
	private Date confirmDt;

	/**
	 * 會員編號
	 */
	@Column(name = "member_id", length = 10, nullable = false)
	private String memberId;

	@Column(name = "login_id", length = 100, nullable = false)
	private String loginId;

	/**
	 * 訂單類型 1:一般 2:SCM
	 */
	@Column(name = "order_type", length = 1)
	private String orderType;

	/**
	 * 轉單SupplierId
	 */
	@Column(name = "scm_supplier_id", length = 6)
	private String scmSupplierId;

	@Column(name = "member_name", length = 100, nullable = true)
	private String memberName;

	/**
	 * 收件人姓名
	 */
	@Column(name = "receiver_name", length = 20)
	private String receiverName;

	/**
	 * 收件省
	 */
	@Column(name = "receiver_province", length = 20)
	private String receiverProvince;

	/**
	 * 收件人城市
	 */
	@Column(name = "receiver_city", length = 20)
	private String receiverCity;

	/**
	 * 收件人地址
	 */
	@Column(name = "receiver_area", length = 20)
	private String receiverArea;

	/**
	 * 收件人郵編
	 */
	@Column(name = "receiver_zip", length = 10)
	private String receiverZip;

	/**
	 * 收件人地址
	 */
	@Column(name = "receiver_addr", length = 100)
	private String receiverAddr;

	/**
	 * 收件人行動電話
	 */
	@Column(name = "receiver_mobile", length = 20)
	private String receiverMobile;
	/**
	 * 收件人電話區碼
	 */
	@Column(name = "receiver_phone_area", length = 10)
	private String receiverPhoneArea;

	/**
	 * 收件人電話
	 */
	@Column(name = "receiver_phone", length = 20)
	private String receiverPhone;

	/**
	 * 收件人分机
	 */
	@Column(name = "receiver_ext", length = 10)
	private String receiverExt;

	/**
	 * 收件人Email
	 */
	@Column(name = "receiver_email", length = 100)
	private String receiverEmail;

	/**
	 * 付款方式
	 */
	@Column(name = "payment_tp", length = 5, nullable = false)
	private String paymentTp;

	/**
	 * 退款狀態
	 */
	@Column(name = "return_status", length = 5, nullable = false)
	private String returnSt;

	/**
	 * 支付的交易流水號
	 */
	@Column(name = "payment_id", length = 20)
	private String paymentId;

	/**
	 * 退款日期
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "payment_date")
	private Date paymentDt;

	/**
	 * 
	 */
	@Column(name = "order_status", length = 5, nullable = false)
	private String orderSt;

	/**
	 * 企業用id
	 */
	@Column(name = "b2e_id", length = 20)
	private String b2eId;

	/**
	 * 申請者ip
	 */
	@Column(name = "CLIENT_IP", length = 100, nullable = false)
	private String clientIp;

	/**
	 * 原始訂單編號
	 */
	@Column(name = "order_id", length = 13, nullable = false)
	private String orderId;

	/**
	 * 單據類別 1：退貨 2：換貨 3：取消
	 * 
	 */
	@Column(name = "src_type", nullable = false)
	private int srcType;

	/**
	 * 退／換／取理由类别
	 */
	@Column(name = "reason_tp", length = 5)
	private String reasonTp;

	/**
	 * 退／換／取的其他理由
	 */
	@Column(name = "reason", length = 90)
	private String reason;

	/**
	 * 描述
	 */
	@Column(name = "description", length = 900)
	private String description;

	/**
	 * 配件說明
	 */
	@Column(name = "accessary_description", length = 900, nullable = false)
	private String accessaryDescription;

	/**
	 * 預估退回我的帳戶
	 */
	@Column(name = "return_my_wallet", nullable = false, columnDefinition = "numeric(10,2)")
	private BigDecimal returnMyWallet = BigDecimal.ZERO;

	/**
	 * 預估退回運費
	 */
	@Column(name = "return_shipfare", nullable = false, columnDefinition = "numeric(10,2)")
	private BigDecimal returnShipfare = BigDecimal.ZERO;

	/**
	 * 預估退回福利金
	 */
	@Column(name = "return_benefit", nullable = false, columnDefinition = "numeric(10,2)")
	private BigDecimal returnBenefit = BigDecimal.ZERO;

	/**
	 * 預估退款金額
	 */
	@Column(name = "return_cash", nullable = false, columnDefinition = "numeric(10,2)")
	private BigDecimal returnCash = BigDecimal.ZERO;

	/**
	 * 預估退回購物金
	 */
	@Column(name = "return_bonus", nullable = false, columnDefinition = "numeric(10,2)")
	private BigDecimal returnBonus = BigDecimal.ZERO;

	/**
	 * 預估退回礼卷
	 */
	@Column(name = "return_coupon", nullable = false, columnDefinition = "numeric(10,2)")
	private BigDecimal returnCoupon = BigDecimal.ZERO;

	/**
	 * 實際退回我的帳戶
	 */
	@Column(name = "real_my_wallet", nullable = false, columnDefinition = "numeric(10,2)")
	private BigDecimal realMyWallet = BigDecimal.ZERO;

	/**
	 * 實際退回運費
	 */
	@Column(name = "real_shipfare", nullable = false, columnDefinition = "numeric(10,2)")
	private BigDecimal realShipfare = BigDecimal.ZERO;

	/**
	 * 實際退回福利金
	 */
	@Column(name = "real_benefit", nullable = false, columnDefinition = "numeric(10,2)")
	private BigDecimal realBenefit = BigDecimal.ZERO;

	/**
	 * 實際退款金額
	 */
	@Column(name = "real_cash", nullable = false, columnDefinition = "numeric(10,2)")
	private BigDecimal realCash = BigDecimal.ZERO;

	/**
	 * 實際退回購物金
	 */
	@Column(name = "real_bonus", nullable = false, columnDefinition = "numeric(10,2)")
	private BigDecimal realBonus = BigDecimal.ZERO;

	/**
	 * 實際退回礼卷
	 */
	@Column(name = "real_coupon", nullable = false, columnDefinition = "numeric(10,2)")
	private BigDecimal realCoupon = BigDecimal.ZERO;

	@Column(name = "canceltp", length = 5)
	private String cancelTp;

	/**
	 * 備註
	 */
	@Column(name = "memo", length = 900, nullable = false)
	private String memo;

	@Column(name = "callin_or_out", length = 10)
	private String callInOrOut;

	/**
	 * 退款核准日期
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "refund_approve_date", nullable = true)
	private Date refundApproveDate;

	/**
	 * 退款成功/失败日期
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "refund_date", nullable = true)
	private Date refundDate;
	/**
	 * 到店時間
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "LOGISTIC_FINAL_DT")
	private Date logisticFinalDt;

	/**
	 * 簽收時間
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "LOGISTIC_SIGN_DT")
	private Date logisticSignDt;

	/**
	 * 店點代碼
	 */
	@Column(name = "STORE_ID", length = 10)
	private String storeId = " ";

	@Column(name = "receiver_tp", length = 5, nullable = false)
	private String receiverTp = "10";

	@Column(name = "DISCOUNT", columnDefinition = "numeric(10,2)")
	private BigDecimal discount = BigDecimal.ZERO;

	@Column(name = "COD_FEE", nullable = false, columnDefinition = "numeric(10,2)")
	private BigDecimal codFee = BigDecimal.ZERO;

	@Column(name = "RETURN_COD_FEE", nullable = false, columnDefinition = "numeric(10,2)")
	private BigDecimal returnCodFee = BigDecimal.ZERO;
	@Column(name = "REAL_COD_FEE", nullable = false, columnDefinition = "numeric(10,2)")
	private BigDecimal realCodFee = BigDecimal.ZERO;

	/**
	 * 原來的服務單號
	 */
	@Column(name = "OLD_SERVICE_ID")
	private String oldServiceId;

	/**
	 * 新服務單號
	 */
	@Column(name = "NEW_SERVICE_ID")
	private String newServiceId;

	@Transient
	private Collection serviceOrderProducts;

	/** 物流配送差異化地址版本 **/
	@Column(name = "VERSION", length = 14)
	private String version;

	/** joinOrder, 合併結帳的訂單編號, 以 , 串接(包含自己訂單編號), 预设 orderId */
	@Column(name = "JOIN_ORDERS", length = 500)
	private String joinOrders;
	/** paymentTxnId, 付款的代表訂單編號, joinOrders 第一筆訂單編號, 後台需求 */
	@Transient
	private String paymentTxnId;

	/** logisticProviderTp, 限物流商代码：50(不限物流)、51(限物流、可cod)、52(限物流、不可cod),后台需求 */
	// @Transient
	@Column(name = "LOGISTIC_PROVIDER_TP", length = 2)
	private String logisticProviderTp = "50";

	// @Transient
	@Column(name = "INSTALLMENT_FEE")
	private BigDecimal installmentFee = BigDecimal.ZERO;
	// @Transient
	@Column(name = "RETURN_INSTALLMENT_FEE")
	private BigDecimal returnInstallmentFee = BigDecimal.ZERO;
	// @Transient
	@Column(name = "REAL_INSTALLMENT_FEE")
	private BigDecimal realInstallmentFee = BigDecimal.ZERO;
	/** 是否自行配送 **/
	@Column(name = "IS_SELF_SHIP", length = 1)
	private String isSelfShip = "N";
	/** 是否直退／换；Y=退回供应商／N=退回耀点仓库 **/
	@Column(name = "IS_RETURN_SUPPLIER", length = 1)
	private String isReturnSupplier = "N";
	/** 退（换）货联络窗口 **/
	@Column(name = "RETURN_CONTACT", length = 20)
	private String returnContact;
	/** 退（换）貨地址 - 省 **/
	@Column(name = "RETURN_PROVINCE", length = 20)
	private String returnProvince;
	/** 退（换）貨地址 - 市 **/
	@Column(name = "RETURN_CITY", length = 20)
	private String returnCity;
	/** 退（换）貨地址 - 區縣 **/
	@Column(name = "RETURN_AREA", length = 20)
	private String returnArea;
	/** 退（换）貨地址 **/
	@Column(name = "RETURN_ADDR", length = 100)
	private String returnAddr;
	/** 退（换）貨地址 - 郵編 **/
	@Column(name = "RETURN_ZIP", length = 10)
	private String returnZip;
	/** 退（换）货联络窗口电话 **/
	@Column(name = "RETURN_PHONE", length = 50)
	private String returnPhone;

	/** 礼品卡余额 */
	@Column(name = "GIFTCARD_BALANCE", columnDefinition = "numeric(10,2)")
	private BigDecimal giftcardBalance = BigDecimal.ZERO;

	/** 退回礼品卡余额 */
	@Column(name = "RETURN_GIFTCARD_BALANCE", columnDefinition = "numeric(10,2)")
	private BigDecimal returnGiftcardBalance = BigDecimal.ZERO;

	/** 礼品卡支付运费 */
	@Column(name = "GIFTCARD_BALANCE_SHIPFARE", columnDefinition = "numeric(10,2)")
	private BigDecimal giftcardBalanceShipfare = BigDecimal.ZERO;

	/**
	 * 實際退回礼品卡余额
	 */
	@Column(name = "REAL_GIFTCARD_BALANCE", nullable = false, columnDefinition = "numeric(10,2)")
	private BigDecimal realGiftcardBalance = BigDecimal.ZERO;

	/**
	 * 淘宝商城订单编号
	 */
	@Column(name = "OUTER_ORDER_ID", length = 30)
	private String outerOrderId;

	/**
	 * @return the installmentFee
	 */
	public BigDecimal getInstallmentFee() {
		return installmentFee;
	}

	/**
	 * @param installmentFee the installmentFee to set
	 */
	public void setInstallmentFee(BigDecimal installmentFee) {
		this.installmentFee = installmentFee;
	}

	/**
	 * @return the returnInstallmentFee
	 */
	public BigDecimal getReturnInstallmentFee() {
		return returnInstallmentFee;
	}

	/**
	 * @param returnInstallmentFee the returnInstallmentFee to set
	 */
	public void setReturnInstallmentFee(BigDecimal returnInstallmentFee) {
		this.returnInstallmentFee = returnInstallmentFee;
	}

	/**
	 * @return the realInstallmentFee
	 */
	public BigDecimal getRealInstallmentFee() {
		return realInstallmentFee;
	}

	/**
	 * @param realInstallmentFee the realInstallmentFee to set
	 */
	public void setRealInstallmentFee(BigDecimal realInstallmentFee) {
		this.realInstallmentFee = realInstallmentFee;
	}

	/**
	 * @return the returnCodFee
	 */
	public BigDecimal getReturnCodFee() {
		return returnCodFee;
	}

	/**
	 * @param returnCodFee the returnCodFee to set
	 */
	public void setReturnCodFee(BigDecimal returnCodFee) {
		this.returnCodFee = returnCodFee;
	}

	/**
	 * @return the realCodFee
	 */
	public BigDecimal getRealCodFee() {
		return realCodFee;
	}

	/**
	 * @param realCodFee the realCodFee to set
	 */
	public void setRealCodFee(BigDecimal realCodFee) {
		this.realCodFee = realCodFee;
	}

	/**
	 * @return the codFee
	 */
	public BigDecimal getCodFee() {
		return codFee;
	}

	/**
	 * @param codFee the codFee to set
	 */
	public void setCodFee(BigDecimal codFee) {
		this.codFee = codFee;
	}

	public String getAccessaryDescription() {
		return accessaryDescription;
	}

	public String getB2eId() {
		return b2eId;
	}

	/**
	 * @return the callInOrOut
	 */
	public String getCallInOrOut() {
		return callInOrOut;
	}

	/**
	 * @return the cancelTp
	 */
	public String getCancelTp() {
		return cancelTp;
	}

	public String getClientIp() {
		return clientIp;
	}

	/**
	 * @return the confirmDt
	 */
	public Date getConfirmDt() {
		return confirmDt;
	}

	public String getDescription() {
		return description;
	}

	public String getLoginId() {
		return loginId;
	}

	public String getMemberId() {
		return memberId;
	}

	public String getMemberName() {
		return memberName;
	}

	public String getMemo() {
		return memo;
	}

	public String getOrderId() {
		return orderId;
	}

	public String getOrderSt() {
		return orderSt;
	}

	public String getOrderType() {
		return orderType;
	}

	public Date getPaymentDt() {
		return paymentDt;
	}

	public String getPaymentId() {
		return paymentId;
	}

	public String getPaymentTp() {
		return paymentTp;
	}

	public BigDecimal getRealBenefit() {
		return realBenefit;
	}

	public BigDecimal getRealBonus() {
		return realBonus;
	}

	public BigDecimal getRealCash() {
		return realCash;
	}

	public BigDecimal getRealMyWallet() {
		return realMyWallet;
	}

	public BigDecimal getRealShipfare() {
		return realShipfare;
	}

	public String getReason() {
		return reason;
	}

	public String getReasonTp() {
		return reasonTp;
	}

	public String getReceiverAddr() {
		return receiverAddr;
	}

	public String getReceiverArea() {
		return receiverArea;
	}

	public String getReceiverCity() {
		return receiverCity;
	}

	public String getReceiverEmail() {
		return receiverEmail;
	}

	public String getReceiverExt() {
		return receiverExt;
	}

	public String getReceiverMobile() {
		return receiverMobile;
	}

	public String getReceiverName() {
		return receiverName;
	}

	public String getReceiverPhone() {
		return receiverPhone;
	}

	public String getReceiverPhoneArea() {
		return receiverPhoneArea;
	}

	public String getReceiverProvince() {
		return receiverProvince;
	}

	public String getReceiverZip() {
		return receiverZip;
	}

	public BigDecimal getReturnBenefit() {
		return returnBenefit;
	}

	public BigDecimal getReturnBonus() {
		return returnBonus;
	}

	public BigDecimal getReturnCash() {
		return returnCash;
	}

	public BigDecimal getReturnMyWallet() {
		return returnMyWallet;
	}

	public BigDecimal getReturnShipfare() {
		return returnShipfare;
	}

	public String getReturnSt() {
		return returnSt;
	}

	public String getScmSupplierId() {
		return scmSupplierId;
	}

	public Date getServiceDt() {
		return serviceDt;
	}

	public String getServiceId() {
		return serviceId;
	}

	@Transient
	public Collection getServiceOrderProducts() {
		return this.serviceOrderProducts;
	}

	public int getSrcType() {
		return srcType;
	}

	public void setAccessaryDescription(String accessaryDescription) {
		this.accessaryDescription = accessaryDescription;
	}

	public void setB2eId(String b2eId) {
		this.b2eId = b2eId;
	}

	/**
	 * @param callInOrOut the callInOrOut to set
	 */
	public void setCallInOrOut(String callInOrOut) {
		this.callInOrOut = callInOrOut;
	}

	/**
	 * @param cancelTp the cancelTp to set
	 */
	public void setCancelTp(String cancelTp) {
		this.cancelTp = cancelTp;
	}

	public void setClientIp(String clientIp) {
		this.clientIp = clientIp;
	}

	/**
	 * @param confirmDt the confirmDt to set
	 */
	public void setConfirmDt(Date confirmDt) {
		this.confirmDt = confirmDt;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public void setLoginId(String loginId) {
		this.loginId = loginId;
	}

	public void setMemberId(String memberId) {
		this.memberId = memberId;
	}

	public void setMemberName(String memberName) {
		this.memberName = memberName;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}

	public void setOrderSt(String orderSt) {
		this.orderSt = orderSt;
	}

	public void setOrderType(String orderType) {
		this.orderType = orderType;
	}

	public void setPaymentDt(Date paymentDt) {
		this.paymentDt = paymentDt;
	}

	public void setPaymentId(String paymentId) {
		this.paymentId = paymentId;
	}

	public void setPaymentTp(String paymentTp) {
		this.paymentTp = paymentTp;
	}

	public void setRealBenefit(BigDecimal realBenefit) {
		this.realBenefit = realBenefit;
	}

	public void setRealBonus(BigDecimal realBonus) {
		this.realBonus = realBonus;
	}

	public void setRealCash(BigDecimal realCash) {
		this.realCash = realCash;
	}

	public void setRealMyWallet(BigDecimal realMyWallet) {
		this.realMyWallet = realMyWallet;
	}

	public void setRealShipfare(BigDecimal realShipfare) {
		this.realShipfare = realShipfare;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}

	public void setReasonTp(String reasonTp) {
		this.reasonTp = reasonTp;
	}

	public void setReceiverAddr(String receiverAddr) {
		this.receiverAddr = receiverAddr;
	}

	public void setReceiverArea(String receiverArea) {
		this.receiverArea = receiverArea;
	}

	public void setReceiverCity(String receiverCity) {
		this.receiverCity = receiverCity;
	}

	public void setReceiverEmail(String receiverEmail) {
		this.receiverEmail = receiverEmail;
	}

	public void setReceiverExt(String receiverExt) {
		this.receiverExt = receiverExt;
	}

	public void setReceiverMobile(String receiverMobile) {
		this.receiverMobile = receiverMobile;
	}

	public void setReceiverName(String receiverName) {
		this.receiverName = receiverName;
	}

	public void setReceiverPhone(String receiverPhone) {
		this.receiverPhone = receiverPhone;
	}

	public void setReceiverPhoneArea(String receiverPhoneArea) {
		this.receiverPhoneArea = receiverPhoneArea;
	}

	public void setReceiverProvince(String receiverProvince) {
		this.receiverProvince = receiverProvince;
	}

	public void setReceiverZip(String receiverZip) {
		this.receiverZip = receiverZip;
	}

	public void setReturnBenefit(BigDecimal returnBenefit) {
		this.returnBenefit = returnBenefit;
	}

	public void setReturnBonus(BigDecimal returnBonus) {
		this.returnBonus = returnBonus;
	}

	public void setReturnCash(BigDecimal returnCash) {
		this.returnCash = returnCash;
	}

	public void setReturnMyWallet(BigDecimal returnMyWallet) {
		this.returnMyWallet = returnMyWallet;
	}

	public void setReturnShipfare(BigDecimal returnShipfare) {
		this.returnShipfare = returnShipfare;
	}

	public void setReturnSt(String returnSt) {
		this.returnSt = returnSt;
	}

	public void setScmSupplierId(String scmSupplierId) {
		this.scmSupplierId = scmSupplierId;
	}

	public void setServiceDt(Date serviceDt) {
		this.serviceDt = serviceDt;
	}

	public void setServiceId(String serviceId) {
		this.serviceId = serviceId;
	}

	public void setServiceOrderProducts(Collection serviceOrderProducts) {
		this.serviceOrderProducts = serviceOrderProducts;
	}

	public void setSrcType(int srcType) {
		this.srcType = srcType;
	}

	public Date getLogisticFinalDt() {
		return logisticFinalDt;
	}

	public void setLogisticFinalDt(Date logisticFinalDt) {
		this.logisticFinalDt = logisticFinalDt;
	}

	public Date getLogisticSignDt() {
		return logisticSignDt;
	}

	public void setLogisticSignDt(Date logisticSignDt) {
		this.logisticSignDt = logisticSignDt;
	}

	public String getStoreId() {
		return storeId;
	}

	public void setStoreId(String storeId) {
		this.storeId = storeId;
	}

	public String getReceiverTp() {
		return receiverTp;
	}

	public void setReceiverTp(String receiverTp) {
		this.receiverTp = receiverTp;
	}

	/**
	 * @return the discount
	 */
	public BigDecimal getDiscount() {
		return discount;
	}

	/**
	 * @param discount the discount to set
	 */
	public void setDiscount(BigDecimal discount) {
		this.discount = discount;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	/**
	 * @return the refundApproveDate
	 */
	public Date getRefundApproveDate() {
		return refundApproveDate;
	}

	/**
	 * @param refundApproveDate the refundApproveDate to set
	 */
	public void setRefundApproveDate(Date refundApproveDate) {
		this.refundApproveDate = refundApproveDate;
	}

	/**
	 * @return the refundDate
	 */
	public Date getRefundDate() {
		return refundDate;
	}

	/**
	 * @param refundDate the refundDate to set
	 */
	public void setRefundDate(Date refundDate) {
		this.refundDate = refundDate;
	}

	public String getOldServiceId() {
		return this.oldServiceId;
	}

	public void setOldServiceId(String oldServiceId) {
		this.oldServiceId = oldServiceId;
	}

	public String getNewServiceId() {
		return this.newServiceId;
	}

	public void setNewServiceId(String newServiceId) {
		this.newServiceId = newServiceId;
	}

	public BigDecimal getReturnCoupon() {
		return returnCoupon;
	}

	public void setReturnCoupon(BigDecimal returnCoupon) {
		this.returnCoupon = returnCoupon;
	}

	public BigDecimal getRealCoupon() {
		return realCoupon;
	}

	public void setRealCoupon(BigDecimal realCoupon) {
		this.realCoupon = realCoupon;
	}

	/**
	 * @return the joinOrder
	 */
	public String getJoinOrders() {
		return joinOrders;
	}

	/**
	 * @param joinOrder the joinOrder to set
	 */
	public void setJoinOrders(String joinOrders) {
		this.joinOrders = joinOrders;
	}

	/**
	 * @return the paymentTxnId
	 */
	public String getPaymentTxnId() {
		if (paymentTxnId == null && "50".equals(paymentTp) && joinOrders != null) {
			paymentTxnId = StringUtils.split(joinOrders, ",")[0];
		}
		return paymentTxnId;
	}

	/**
	 * @param paymentTxnId the paymentTxnId to set
	 */
	public void setPaymentTxnId(String paymentTxnId) {
		this.paymentTxnId = paymentTxnId;
	}

	public String getLogisticProviderTp() {
		return logisticProviderTp;
	}

	public void setLogisticProviderTp(String logisticProviderTp) {
		this.logisticProviderTp = logisticProviderTp;
	}

	/**
	 * @return the isSelfShip
	 */
	public String getIsSelfShip() {
		return isSelfShip;
	}

	/**
	 * @param isSelfShip the isSelfShip to set
	 */
	public void setIsSelfShip(String isSelfShip) {
		this.isSelfShip = isSelfShip;
	}

	/**
	 * @return the isReturnSupplier
	 */
	public String getIsReturnSupplier() {
		return isReturnSupplier;
	}

	/**
	 * @param isReturnSupplier the isReturnSupplier to set
	 */
	public void setIsReturnSupplier(String isReturnSupplier) {
		this.isReturnSupplier = isReturnSupplier;
	}

	/**
	 * @return the returnContact
	 */
	public String getReturnContact() {
		return returnContact;
	}

	/**
	 * @param returnContact the returnContact to set
	 */
	public void setReturnContact(String returnContact) {
		this.returnContact = returnContact;
	}

	/**
	 * @return the returnProvince
	 */
	public String getReturnProvince() {
		return returnProvince;
	}

	/**
	 * @param returnProvince the returnProvince to set
	 */
	public void setReturnProvince(String returnProvince) {
		this.returnProvince = returnProvince;
	}

	/**
	 * @return the returnCity
	 */
	public String getReturnCity() {
		return returnCity;
	}

	/**
	 * @param returnCity the returnCity to set
	 */
	public void setReturnCity(String returnCity) {
		this.returnCity = returnCity;
	}

	/**
	 * @return the returnArea
	 */
	public String getReturnArea() {
		return returnArea;
	}

	/**
	 * @param returnArea the returnArea to set
	 */
	public void setReturnArea(String returnArea) {
		this.returnArea = returnArea;
	}

	/**
	 * @return the returnAddr
	 */
	public String getReturnAddr() {
		return returnAddr;
	}

	/**
	 * @param returnAddr the returnAddr to set
	 */
	public void setReturnAddr(String returnAddr) {
		this.returnAddr = returnAddr;
	}

	/**
	 * @return the returnZip
	 */
	public String getReturnZip() {
		return returnZip;
	}

	/**
	 * @param returnZip the returnZip to set
	 */
	public void setReturnZip(String returnZip) {
		this.returnZip = returnZip;
	}

	/**
	 * @return the returnPhone
	 */
	public String getReturnPhone() {
		return returnPhone;
	}

	/**
	 * @param returnPhone the returnPhone to set
	 */
	public void setReturnPhone(String returnPhone) {
		this.returnPhone = returnPhone;
	}

	public BigDecimal getGiftcardBalance() {
		return giftcardBalance;
	}

	public BigDecimal getReturnGiftcardBalance() {
		return returnGiftcardBalance;
	}

	public BigDecimal getGiftcardBalanceShipfare() {
		return giftcardBalanceShipfare;
	}

	public void setGiftcardBalance(BigDecimal giftcardBalance) {
		this.giftcardBalance = giftcardBalance;
	}

	public void setReturnGiftcardBalance(BigDecimal returnGiftcardBalance) {
		this.returnGiftcardBalance = returnGiftcardBalance;
	}

	public void setGiftcardBalanceShipfare(BigDecimal giftcardBalanceShipfare) {
		this.giftcardBalanceShipfare = giftcardBalanceShipfare;
	}

	public BigDecimal getRealGiftcardBalance() {
		return realGiftcardBalance;
	}

	public void setRealGiftcardBalance(BigDecimal realGiftcardBalance) {
		this.realGiftcardBalance = realGiftcardBalance;
	}

	public String getOuterOrderId() {
		return outerOrderId;
	}

	public void setOuterOrderId(String outerOrderId) {
		this.outerOrderId = outerOrderId;
	}

}
